<div class="pageContent">
    <div class="pageFormContent" id="shiftingEditPageContent">
        <input type="hidden" name="navTabId" value="${navTabId}"> <input
            type="hidden" name="id" value="${shifting.id}">
        <fieldset>
            <dl>
                <dt>工作中心：</dt>
                <dd>
                    <input name="workcenterText" value="${shifting.workcenterText}"
                        size="22" type="text" maxlength="60" readonly="readonly" />
                </dd>
            </dl>
            <dl>
                <dt>人员编号：</dt>
                <dd>
                    <input name="personnelCode" value="${shifting.personnelCode}"
                        size="22" type="text" maxlength="60" readonly="readonly" />
                </dd>
            </dl>
            <dl>
                <dt>姓名：</dt>
                <dd>
                    <input name="personnelName" value="${shifting.personnelName}"
                        readonly="readonly" size="22" type="text" maxlength="60" /> <input
                        name="workcenterCode" value="${shifting.workcenterCode}"
                        type="hidden" />
                </dd>
            </dl>
            <dl>
                <dt>日期：</dt>
                <dd>
                    <input id="theDate" name="theDate" readonly="readonly" 
                        value='${(shifting.theDate?string("yyyy-MM-dd"))?if_exists}'
                        size="22" formate type="text" maxlength="60" class="readonly" />
                </dd>
            </dl>
        </fieldset>
    </div>
    <div id="shiftingsList"></div>
    <ul id="closeBtn" style="float: right; margin: 10px 0px;">
        <li style="float: right;">
            <div class="buttonActive">
                <div class="buttonContent">
                    <button type="button" class="close"><@label key="close.B">关闭</@label></button>
                </div>
            </div>
        </li>
    </ul>
</div>
<script type="text/javascript">
(function(){
    var $page = DWZ.context(), $grid = $('#shiftingsList', $page), dateFormat = 'yyyy-MM-dd', dateTimeFormat = 'yyyy-MM-dd HH:mm';
    $grid.jGrid({
        base: '${rc.getContextPath()}/manage/shifting/',
        url: 'getShiftingList',
        height: 210,
        width: 950,
        autoLoad: false,
        columnresizeable: true,
        orderable: false,
        pageable: false,
        hasBorder: true,
        columns: [
            {field: '_index', text: '<@label key="serialNumber.C">序号</@label>', width: 40},
            {field: 'personnelCode', text: '人员编号', width: 100, orderTable: 's'},
            {field: 'personnelName', text: '姓名', width: 60},
            /*{field: 'personnelTypeText', text: '人员类型', width: 100},*/
            {field: 'workcenterText', text: '工作中心', width: 100},
            {field: 'shiftingWorkcenterText', text: '<@label key="shiftingWorkCenter.C">实际工作中心</@label>', width: 100},
            /*{field: 'materialText', text: '物料', width: 60},*/
            {field: 'theDate', type: 'date', format: dateFormat, text: '日期', width: 80},
            {field: 'startDateTime', type: 'date', format: dateTimeFormat, text: '开始时间', width: 120},
            {field: 'endDateTime', type: 'date', format: dateTimeFormat, text: '结束时间', width: 120},
            {field: 'memo', text: '备注', width: 60}
        ]
    });
    $.ajax({
        url: '${rc.getContextPath()}/manage/shifting/getShiftingListByPersonnelAndDate',
        data: {
            personnelCode: '${shifting.personnelCode}',
            theDate: '${(shifting.theDate?string("yyyy-MM-dd"))?if_exists}'
        },
        dataType: 'json',
        success: function(json){
            $grid.jGrid('fillGrid', json);
        }
    });
})(jQuery);
</script>